<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<!-- 
		<script type="text/javascript">
			var inputObj = document.getElementsByTagName('input')[0];
			console.log(inputObj.value);
		</script> -->
		<script>
			window.onload = function(){
				var inputObj = document,getElementsByTagName('input')[0];
				console.log(inputObj.value);
			}
		</script>
	</head>
	<body>
		<input type="text" value="Hello JS Dom"/>
				
				<!-- 
				<script type="text/javascript">
					var inputObj = document.getElementsByTagName('input')[0];
					console.log(inputObj.value);
				</script> --> 
	</body>
</html>